<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>
		<c:if test="${param.wlc != 'yes'}">
			${primaryCode}外盘行情 - 
		</c:if>
		币时代，关注全球电子货币最新市场动向</title>
		<meta name="description" content="币时代 - coin38.com,关注全球电子货币最新市场动向" />
    	<meta name="keywords" content="币时代,C网,国内C网,外盘行情,山寨币,比特币,国际山寨币市场,${param.label == null ? 'MEC/CNY' : param.label},bitcoin, BTC, litecoin, LTC, namecoin, ppcoin, terracoin, freicoin, feathercoin, FTC, NMC, TRC, FRC, PPC, 交易平台，交易网站，比特币交易，比特币兑换，比特币市场" />
    	<base href="${pageContext.request.contextPath}/">
    	<link rel="icon" href="favicon.ico" type="image/x-icon"/> 
		<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/> 
		<link href="css/style.css" rel="stylesheet" media="screen">
		<link href="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css" rel="stylesheet" media="screen">
		<style type="text/css">
			* {
				font-size: 13px;
			}
			.priceinput {
				width:94px;
				text-align:right;
				height:20px;
				vertical-align:baseline;
				/*font-weight: bold;*/
				color: red;
				border: 1px solid #DDD;
				padding-left:5px;
				padding-right:5px;
			}
			.searchbox {
				border:1px solid #DDD;
				margin-left:35px;
				margin-top:15px;
				width:180px;
				font-size:16px;
				color:#333;
				font-weight:bold;
				background-image:url(image/search.png);
				background-repeat:no-repeat;
				background-position:bottom right;
				padding-left:5px;
				margin-bottom:0px;
			}
		</style>
		<script type="text/javascript">
			defaultBasePrice = 1;
			if ('${secondCode}' == 'BTC') {
				defaultBasePrice = ${btcPrice};
			} else {
				defaultBasePrice = ${ltcPrice};
			}
		</script>
	</head>
	<body>
		<div id="notice" style="display:none;background-color:#FDFBDB;font-weight:normal;padding:5px 0px;font-size:13px;text-align:center;">
			手机网页版<a href="http://m.coin38.com" style="color:red;font-size:16px;font-weight:bold;padding:5px;">m.coin38.com</a>已成功上线，欢迎试用...<span style="font-size:12px;color:#AAA;font-weight:normal;">(7秒后自动关闭)</span>
		</div>
		<!-- Fixed navbar -->
		<div class="navbar navbar-default navbar-blue">
			<div class="container ">
				<div class="navbar-header" style="font-size:26px;font-weight:bold;line-height:50px;">
					<a href=""><img alt="币时代" src="image/logo11.png" height="40px"></a>
					<span style="font-weight:bold;font-size:14px;color:white;">“关注全球电子货币最新市场动向”</span>
				</div>
				<ul class="nav navbar-nav pull-right">
					<li>
						<span style="display:block;padding:18px 10px;">
							<img alt="m.coin38.com" border="0" style="width:20px;" src="image/android1.png">&nbsp;手机网页版：m.coin38.com
						</span>
					</li>
					<li>
						<span style="display:block;padding:18px 10px;">
							<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=72b79eb4c03158610f5af1e60d109de617abe93f934b8b9fb6bde03d05482800"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="币时代官方群1" title="币时代官方群1"></a>
						</span>
					</li>
					<li>
						<span style="display:block;padding:18px 10px;">
							<a href="http://www.bimeiti.com" style="color:white;" target="_blank">进入论坛</a>
						</span>
					</li>
				</ul>
			</div>
		</div>
		<div id="wrap" class="container ">
			<div class="row maincontents">
				<!-- Sidebar start -->
				<div class="" id="sidebar" role="navigation">
					<input class="searchbox" maxlength="5" onkeyup="javascript:searchLabel(this.value)">
					<div class="moduletable moduletable-ltc-markets" style="height:1400px;overflow:auto;">
						<ul class="nav nav-list" id="leftltclist">
							<c:forEach items="${markets}" var="market">
								<li style="${marketId == market.marketid ? 'backgroud-color:#AAA;border:1px solid #999;' : ''}">
									<a id="leftmarketinfo" style="font-size:10px;" class="leftmarketinfo" href="market/${market.marketid}/${market.primarycode}_${market.secondarycode}.html" title="${market.label}(${market.secondarycode})">
										${market.label}
										<span class="pull-right glyphicon glyphicon-arrownone leftmarketinfo_94_arrow" style="font-size:10px;color:#AAA;">(${market.secondarycode})</span>
										<span class="status pull-right" style="font-size:10px;" id="market_price_94">${market.cnyPrice}</span>
									</a>
								</li>
							</c:forEach>
						</ul>
					</div>
				</div>
				<!-- Sidebar end -->

				<!-- Content start -->
				<div class="page" id="content" role="main">
					<div class="working-contents">
						<br>
						<div style="float:left;font-size:14px;font-weight:normal;color:#333;">
							比特币&nbsp;BTC/CNY：
							<c:if test="${secondCode != 'BTC'}">
								${btcPrice}
							</c:if>
							<c:if test="${secondCode == 'BTC'}">
								<input id="basePriceInput" maxlength="10" onblur="javascript:load(${marketId}, this.value);" onKeyPress="if (event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" class="priceinput" value="${btcPrice}">
							</c:if>
							&nbsp;&nbsp;&nbsp;&nbsp;
							莱特币&nbsp;LTC/CNY：
							<c:if test="${secondCode != 'LTC'}">
								${ltcPrice}
							</c:if>
							<c:if test="${secondCode == 'LTC'}">
								<input id="basePriceInput" maxlength="10" onblur="javascript:load(${marketId}, this.value);" onKeyPress="if (event.keyCode!=46 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" class="priceinput" value="${ltcPrice}">
							</c:if>
						</div>
						<!-- JiaThis Button BEGIN -->
						<div class="jiathis_style" style="float:right;padding-right:10px;">
							<a class="jiathis_button_qzone"></a>
							<a class="jiathis_button_tsina"></a>
							<a class="jiathis_button_tqq"></a>
							<a class="jiathis_button_renren"></a>
							<a class="jiathis_button_kaixin001"></a>
							<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
							<a class="jiathis_counter_style"></a>
						</div>
						<!-- JiaThis Button END -->
						
						<div class="page page-dashboard" style="float: left;margin-top:15px;margin-right: 10px;">
							<div class="panel panel-default panel-charts" style="width:750px;border:1px solid #DDD;">
								<div class="panel-heading">
									<span class="glyphicon glyphicon-market-charts"></span><label id="tradeLabel" style="font-size:18px;">交易${primaryCode == null ? "MEC" : primaryCode}/CNY(${secondCode})：${market.cnyPrice}</label>
									<span style="float: right; font-size: 12px;">数据每5分钟自动更新，<a href="javascript:load(${marketId})">手动更新</a></span>
								</div>
								<div class="panel-body">
									<div id="tradechart" style="height: 500px;" data-highcharts-chart="1">
										<div id="containerCurrentChart" style="height: 500px; min-width: 700px"></div>
									</div>
								</div>
							</div>
							<!--/panel charts-->

							<!-- row start -->
							<div class="row small-market-list">
								<!-- start cell -->
								<div class="col-xs-6">
									<div class="panel panel-default panel-market-list-small">
										<div class="panel-heading">
											<span class="glyphicon glyphicon-open-orders"></span>卖单&nbsp;${primaryCode}/CNY<small>(${secondCode})</small>
										</div>

										<table cellpadding="0" cellspacing="0" border="0" id="sellorderlist" class="table table2 table-striped">
											<thead>
												<tr><th>价格&nbsp;&nbsp;&nbsp;&nbsp;</th><th>卖出量</th><th>成交价(CNY)</th></tr>
											</thead>
											<tbody>
												<%-- 
												<c:forEach items="${buys}" var="buy">
													<tr><td>${buy.price}</td><td>${buy.quantity}</td><td>${buy.total}</td></tr>
												</c:forEach>
												--%>
											</tbody>
										</table>

									</div>
									<!-- end panel-list -->
								</div>
								<!--/end cell-->

								<!-- start cell -->
								<div class="col-xs-6">
									<div class="panel panel-default panel-market-list-small">
										<div class="panel-heading">
											<span class="glyphicon glyphicon-open-orders"></span>买单&nbsp;${primaryCode}/CNY<small>(${secondCode})</small>
										</div>

										<table cellpadding="0" cellspacing="0" border="0" id="buyorderlist" class="table table2 table-striped">
											<thead>
												<tr><th>价格&nbsp;&nbsp;&nbsp;&nbsp;</th><th>买入量</th><th>成交价(CNY)</th></tr>
											</thead>
											<tbody>
												<%-- 
												<c:forEach items="${sells}" var="sell">
													<tr><td>${sell.price}</td><td>${sell.quantity}</td><td>${sell.total}</td></tr>
												</c:forEach>
												--%>
											</tbody>
											</tbody>
										</table>

									</div>
									<!--/end panel-list-->
								</div>
								<!--/end cell-->

							</div>
							<!--/end row-->


							<div class="panel panel-default panel-trade-list">

								<div class="panel-heading">
									<span class="glyphicon glyphicon-account-balances"></span>${primaryCode}/CNY(${secondCode})&nbsp;成交记录<small>(最近200条)</small>
								</div>

								<div class="tablewrap" id="market-wrap">
									<table cellpadding="0" cellspacing="0" border="0" id="tradehistory" class="table table-striped dataTable">
										<thead>
											<tr><th>时间</th><th>类型</th><th>价格(CNY)</th><th>成交量</th><th>成交价(CNY)</th></tr>
										</thead>
										<tbody>
											<%-- 
											<c:forEach items="${hisTrades}" var="his">
												<tr><td>${his.time}</td><td>${his.type}</td><td>${his.price}</td><td>${his.quantity}</td><td>${his.total}</td></tr>
											</c:forEach>
											--%>
										</tbody>
									</table>
								</div>

							</div>
							
							<div style="text-align:right;">
								交易平台：
								<a target="_blank" href="https://www.cryptsy.com/markets/view/${marketid}?refid=56933">C网</a>、
								<a target="_blank" href="https://cn.bter.com/trade/${primaryCode}_cny">比特儿</a>、
								<a target="_blank" href="http://www.btc38.com/trade.html?btc38_trade_coin_name=${primaryCode}">比特时代</a>
							</div>
							<!--/panel charts-->
						</div>
						<div class="clearfix"></div>
					</div>
					<!--/end working-contents-->
				</div>
				<!--/content End -->
			</div>
			<!--/row/maincontents-->
		</div>
		<!-- /container -->
		<div class="clearfix"></div>
		<footer>
			<div class="container">
				<div class="row">
					<!--<div class="col-xs-2 footer-logo">
						<a href="/" title=""><img src="https://www.cryptsy.com/img/logo.png" alt="">
						</a>
					</div>-->
					<div class="col-xs-4" style="padding-top:20px;">
						<p>
							币时代联盟：
							<a href="https://www.cryptsy.com/users/register?refid=56933" target="_blank" style="color:white;">C网</a>
							<a href="https://bter.com/ref/56603" target="_blank" style="color:white;">比特儿</a>
							<a href="http://www.bimeiti.com/portal.php" target="_blank" style="color:white;">币媒体</a>
							<a href="http://www.coinmarket.cn" target="_blank" style="color:white;">币集市</a>
						</p>
					</div>
					<div class="col-xs-4" style="padding-top:20px;">
						<p>
							<img alt="m.coin38.com" border="0" style="width:20px;" src="image/android1.png">&nbsp;手机网页版：m.coin38.com
						</p>
					</div>
					<div style="padding-top:10px;">
						<ul class="nav nav-pills pull-right" style="padding-right:0px;">
							<li>
								<%-- 
								<img alt="QQ" border="0" style="width:20px;" src="http://pub.idqqimg.com/qconn/wpa/button/button_121.gif">&nbsp;官方交流群：198091285
								--%>
								<a target="_blank" href="http://shang.qq.com/wpa/qunwpa?idkey=72b79eb4c03158610f5af1e60d109de617abe93f934b8b9fb6bde03d05482800"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="币时代官方群1" title="币时代官方群1"></a>
							</li>
							<li>
								&nbsp;&nbsp;&nbsp;&nbsp;&copy; 2013 币时代版权所有
							</li>
						</ul>
					</div>
				</div>
			</div>
		</footer>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
	<%-- <script type="text/javascript" src="http://code.highcharts.com/stock/highstock.js"></script>--%>
	<script type="text/javascript" src="js/highstock.js"></script>
	<script type="text/javascript" src="js/vc.js"></script>
	<script type="text/javascript">
		$(function() {
			//initNavPanel(${param.mid == null ? 45 : param.mid});
			initHighChartsTheme();
			initStockChart(${marketId});
			initTables(${marketId});
			
			<%--
			<c:if test="${param.wlc == 'yes'}">
				$("#notice").slideDown("slow", function() {
					setTimeout(function() {
						$("#notice").slideUp("slow");
					}, 10 * 1000);
				});
			</c:if>
			--%>
		});
	</script>
	<script type="text/javascript" src="http://v3.jiathis.com/code_mini/jia.js" charset="utf-8"></script>
	<div style="display:none;">
		<script language="javascript" type="text/javascript" src="http://js.users.51.la/16618737.js"></script>
		<noscript><a href="http://www.51.la/?16618737" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/16618737.asp" style="border:none" /></a></noscript>
	</div>
	</body>
</html>
